package me.thinkjet.sso.client.filter;

import javax.servlet.FilterConfig;

import me.thinkjet.sso.client.validation.ServiceTicketValidator;
import me.thinkjet.sso.client.validation.TicketValidator;

public class TicketValidationFilter extends AbstractTicketValidationFilter {

	protected final TicketValidator getTicketValidator(
			final FilterConfig filterConfig) {
		final String validateUrl = getPropertyFromInitParams(filterConfig,
				"validateUrl", null);
		final String clientId = getPropertyFromInitParams(filterConfig,
				"clientId", null);
		final String key = getPropertyFromInitParams(filterConfig,
				"key", null);
		final ServiceTicketValidator validator = new ServiceTicketValidator(
				validateUrl, clientId, key);

		return validator;
	}

}
